package com.css.cloudlearn.productornacos.sentinel;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author 郭辉
 * @className TODO
 * @description 所有的fallback的处理操作全部都是基于切面的形式完成的
 * @date 2022/11/21 20:26
 * @company 海康威视
 * @since 1.0.0
 */
@Configuration
@EnableAspectJAutoProxy(exposeProxy = true, proxyTargetClass = true)//CGLIB代理
public class SentinelAopConfig {

    @Bean
    public SentinelResourceAspect getSentinelResourceAspect(){
        return new SentinelResourceAspect();
    }
}
